package com.qlslylq.ad.sdk.enums;

/**
 * 广告类型<br/>
 */
public enum AdType {

    SPLASH("开屏", "splash"),
    INTERSTITIAL("插屏", "interstitial"),
    REWARDED("激励", "rewarded"),
    FULLSCREEN("全屏", "fullScreen"),
    FEED("信息流", "feed"),
    BANNER("横幅", "banner");

    private String id;

    private String name;

    AdType(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static AdType getEnumByName(String name) {
        for (AdType item : AdType.values()) {
            if (item.getName().equals(name)) {
                return item;
            }
        }
        return null;
    }
}
